package org.openmore.opc.service.feignFactory;

import feign.hystrix.FallbackFactory;
import org.openmore.opc.dto.BaseResponse;
import org.openmore.opc.service.TestInterface;
import org.springframework.stereotype.Component;

@Component
public class TestInterfaceFeignFactory extends BaseFeignFallback implements FallbackFactory<TestInterface> {
    @Override
    public TestInterface create(Throwable cause) {
        return new TestInterface() {
            @Override
            public BaseResponse addProduct(String userId) {
                return getFallBackResponse();
            }
        };
    }
}
